package electricity.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import electricity.vo.WorkOrder.WorkOrderDetailVO;
import electricity.vo.WorkOrder.WorkOrderListVO;
import electricity.vo.WorkOrder.WorkOrderStatusLogVO;

import java.util.List;

public interface WorkOrderService {
    // 创建工单
    String createWorkOrder(Long faultId, String deviceId, Integer priority);

    // 分配处理人
    boolean assignProcessor(String workOrderId, String processorId);

    // 开始处理工单
    boolean startProcessing(String workOrderId, String processorId);

    // 完成工单
    boolean completeWorkOrder(String workOrderId, String processorId, String notes, String images);

    // 标记工单失败
    boolean markWorkOrderFailed(String workOrderId, String processorId, String failureReason);

    // 查询工单详情
    WorkOrderDetailVO getWorkOrderDetail(String workOrderId);

    // 查询工单列表（带分页）
    Page<WorkOrderListVO> listWorkOrders(Integer status, Integer pageNum, Integer pageSize,Integer processorId);

    // 查询工单状态变更历史
    List<WorkOrderStatusLogVO> getStatusHistory(String workOrderId);
}
